﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemplateEdit.aspx.cs" Inherits="PPAP.Web.Master.TemplateEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head >
    <title></title>
    <script language="javascript">
        function del(id) {
            if (id > 0) {
                if (confirm('Please confirm to delete the file.')) {
                    url = "Template.aspx?deid=" + id;
                    window.location.href = url;
                }
            }
        }
		</script>
</head>
<body style="font-family: Arial, Helvetica, sans-serif;overflow-x:hidden;"  bgcolor="#E7E8E8" >
    <form id="form1" runat="server">
    <div>
    <table width="100%" style="padding-left:10px; font-weight:bold; color:#2E8AC5;">
    <tr><td>
        Attachment Type
        </td><td>
            <asp:TextBox ID="txtAttachment" runat="server" Enabled="False"></asp:TextBox>
        </td><td>
            Remark
        </td><td>
            <asp:TextBox ID="txtRemark" runat="server"></asp:TextBox>
        </td></tr>

        <tr><td>
        BDNT Template Available
        </td><td>
                <asp:DropDownList ID="ddlTemplateAvailable" runat="server">
                    <asp:ListItem Value="1">Yes</asp:ListItem>
                    <asp:ListItem Value="0">No</asp:ListItem>
                </asp:DropDownList>
        </td><td colspan="2">
                <asp:CheckBox ID="cbLevel1" runat="server" Text="Level1" />
&nbsp;<asp:CheckBox ID="cbLevel2" runat="server" Text="Level2" />
&nbsp;<asp:CheckBox ID="cbLevel3" runat="server" Text="Level3" />
        </td></tr>

        <tr><td>
       Suppliers' Template Accepted
        </td><td>
                <asp:DropDownList ID="ddlTemplateAccepted" runat="server">
                    <asp:ListItem Value="1">Yes</asp:ListItem>
                    <asp:ListItem Value="0">No</asp:ListItem>
                </asp:DropDownList>
        </td><td>
                &nbsp;</td><td align="right">
                    <asp:Label ID="lblUp" runat="server" Text=""></asp:Label>
              </td></tr>
                <tr>
                <td colspan="4">
                    <asp:GridView ID="GridView2" runat="server" CellPadding="4" Width="100%" ForeColor="#333333"
                        GridLines="None" AutoGenerateColumns="False">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="No." ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("rownum") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                          
                            <asp:TemplateField HeaderText="Title" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%#Eval("F_Filename") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Type" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='pdf'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Size" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:Label ID="Label7" runat="server" Text='<%# Eval("filesize") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Create date" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                   <asp:Label ID="Label8" runat="server" Text='<%# Eval("UpTime") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Link" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <a href='<%#Eval("F_URL") %>' target="_blank"><span style="color: Blue;"><%# Eval("F_Filename")%></span></a>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Delete" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1"  Visible=<%#Eval("F_ID").ToString()==""?false:false %>   runat="server" onclientclick="return confirm('Please confirm to delete the file.')" 
                        PostBackUrl=<%# "Template.aspx?deid="+Eval("F_ID")%>
                        >Delete</asp:LinkButton>
                          <img src="../Images/newimg/delete.png" title="Delete" onclick="<%#"javascript:del("+Eval("F_ID")+")" %>" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2E8AC5" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#2E8AC5" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </td>
            </tr>
    
    <tr><td colspan="4" align="center">
        <asp:Button ID="Button1" CssClass="button" runat="server" 
            Text="Add" onclick="Button1_Click" Visible="False" 
            onclientclick="return confirm('Are you sure you want to save?');" /></td></tr></table>
    </div>
    </form>
</body>
</html>
